package com.ibm.workplace.wcm.cqplugin.cq;

import com.ibm.workplace.wcm.cqplugin.*;

public class CqDefectQuery implements IBugQuery {
    
    private String name;
    private CqDefectSearchCriteria searchCriteria;
    private String[] connectionProfileNames;
    private String[] columnIds;
    
    public CqDefectQuery() {
        this(new CqDefectSearchCriteria());
    }    
    
    public CqDefectQuery(CqDefectSearchCriteria searchCriteria) {
        this(null, searchCriteria, null, null);
    }

    public CqDefectQuery(String name, CqDefectSearchCriteria searchCriteria, String[] connectionProfileNames, String[] columnIds) {
        super();
        
        this.name = name;
        this.searchCriteria = searchCriteria;
        this.connectionProfileNames = connectionProfileNames;
        this.columnIds = columnIds;
    }

    public String getName() {
        return name;
    }

    public IBugSearchCriteria getSearchCriteria() {
        return searchCriteria;
    }

    public String[] getConnectionProfileNames() {
        return connectionProfileNames;
    }
    
    public void setConnectionProfileNames(String[] connectionProfileNames) {
        this.connectionProfileNames = connectionProfileNames;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public void setSearchCriteria(CqDefectSearchCriteria searchCriteria) {
        this.searchCriteria = searchCriteria;
    }

    /**
     * Returns an array representing the columns to display when this query is performed.
     * 
     */
    public String[] getColumnIds() {
        return columnIds;
    }
    
    public void setColumnIds(String[] columnIds) {
        this.columnIds = columnIds;
    }

}
